import wx
import wx.py as shell


class Book_shell(wx.Panel):
    def __init__(self, parent, file_name, type_shell, **k):
        wx.Panel.__init__(self, parent, **k)
        win = shell.shell.Shell(self, -1, introText="[ PyCrust 版本: {} ]".format(shell.version.VERSION))
        bSizer = wx.BoxSizer( wx.VERTICAL )
        bSizer.Add(win, 1, wx.ALL | wx.EXPAND, 5 )
        self.SetSizer( bSizer )
        self.Layout()
        self.Bind(wx.EVT_CLOSE, self.on_close)

    def on_close(self, eve):
        self.Destroy()




def main():
    app = wx.App()
    ex = wx.Frame(None)
    Book_shell(ex, None, 69)
    ex.Show()
    app.MainLoop()


if __name__ == '__main__':
    main()